from random import seed, uniform
from datetime import datetime

if __name__ == "__main__":
    seed(datetime.now())
    sum = 0
    for i in range(int(1e7)):
        sum += 1 if pow(uniform(-1, 1), 2) + pow(uniform(-1, 1), 2) <= 1 else 0
    print("PI=%f"%(4 * sum / i))